package com.sunlands.qdcy.tongzhuo.feign;

import com.sunlands.qdcy.tongzhuo.config.OauthFeignConfig;
import com.sunlands.qdcy.tongzhuo.feign.vo.BuryingPointVO;
import com.sunlands.qdcy.tongzhuo.feign.vo.UserInfoDTO;
import com.sunlands.qdcy.tongzhuo.vo.BusinessResult;
import com.sunlands.qdcy.tongzhuo.vo.Page;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author zhangxiaobin
 * @description: TODO
 * @date 2019/4/1716:45
 */
@FeignClient(value = "tz-user-center",configuration = OauthFeignConfig.class)
public interface UserCenterService {

    @RequestMapping(value = "/users/{id}", method = RequestMethod.GET)
    BusinessResult<UserInfoDTO> getUserInfoById(@PathVariable("id") Long userId);

    @RequestMapping(value = "/users/homepage/user", method = RequestMethod.GET)
    BusinessResult<Page<UserInfoDTO>> homePageUsers(@RequestParam(name = "userId", defaultValue = "0") Long userId,
                                                    @RequestParam(name = "page", defaultValue = "1") Integer page,
                                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                    @RequestParam(name = "userIdStr") String userIdStr);
    @PostMapping("/users/list")
    BusinessResult<List<UserInfoDTO>> list(@RequestBody List<Long> idList);

    @PostMapping("/burying-point/client/add")
    BusinessResult<BuryingPointVO> add(@RequestBody BuryingPointVO idList);
}
